<?php

namespace App\Models\Common;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class LinkLog extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'link_logs';

    protected $fillable = [
        'link_id', 'day', 'ip', 'source', 'comment',
    ];

    public function link() : BelongsTo
    {
        return $this->belongsTo(Link::class, 'link_id');
    }

}
